// VedioPlayer.cpp

#include "stdafx.h"
#include "VedioPlayer.h"
#include "VedioPlayerSetUpDlg.h"
#include "VPErrorHandler.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif//_DEBUG

BEGIN_MESSAGE_MAP(VedioPlayerApp, CWinApp)
    ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()

VedioPlayerApp theApp;

VedioPlayerApp::VedioPlayerApp()
{
    m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
}

BOOL VedioPlayerApp::InitInstance()
{
    CWinApp::InitInstance();

    AfxEnableControlContainer();

    CShellManager *pShellManager = new CShellManager;

    SetRegistryKey(_T("Local AppWizard-Generated Applications"));

    VPErrorHandler::Initialize();

    VedioPlayerSetUpDlg dlg;
    m_pMainWnd = &dlg;
    INT_PTR nResponse = dlg.DoModal();

    if (pShellManager != NULL)
    {
        delete pShellManager;
    }

    return FALSE;
}
